package com.roomaja.controller;

import com.roomaja.Remote.HelloRemote;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by 15361 on 2018/8/5.
 */
@RestController
public class ConsumerController {

    @Autowired
    HelloRemote helloRemote;

    @RequestMapping("/hello/{name}")
    public String index(@PathVariable("name") String name) {
        return helloRemote.hello(name);
    }

    @RequestMapping("/w/{resType}/getOne")
    public ResponseEntity<byte[]> getWallpaper(@PathVariable("resType") String resType){
        return helloRemote.getOne(resType);
    }

}
